<?php
namespace app\system\controller;
use app\Request;
use app\system\service\DepartmentService;

class Department{
    protected $departmentService;

    public function __construct(DepartmentService $departmentService)
    {
        $this->departmentService = $departmentService;
    }

    /**
     * 描述:部门列表
     * 参数:{}
     * 返回:
     * 作者:W
     */
    public function departmentList(Request $request){
        return $this->departmentService->getDepartments($request);
    }

    /**
     * 描述:新增部门
     * 参数:{}
     * 返回:
     * 作者:W
     */
    public function addDepartment(Request $request){
        return $this->departmentService->addDepartment($request);
    }

    /**
     * 描述:更新部门
     * 参数:{}
     * 返回:
     * 作者:W
     */
    public function updateDepartment(Request $request){
        return $this->departmentService->updateDepartment($request);
    }
}